import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

public class Demo1 {
    public static void main(String[] args) {
        try (InputStream inputStream = new FileInputStream("./text.txt")) {
       while (true) {
           int b = inputStream.read();
           if(b==-1){
               //读取完毕
               break;
           }
           System.out.printf( "0x%x\n", b);
       }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
